package Dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import Bean.SboardBean;
import Bean.SingerBean;
import Bean.rowBean;

public class SingerDao extends SqlMapClientDaoSupport{

	public List<SingerBean> SingerList() {
		return (List<SingerBean>) getSqlMapClientTemplate().queryForList(
				"SingerList");
	}
	
	public List<SboardBean> Singerboard(rowBean row){
		return (List<SboardBean>) getSqlMapClientTemplate().queryForList("SboardList",row);
	}
	
	public int SboardTotal(int sb_s_no) {
		return (int) getSqlMapClientTemplate().queryForObject("SboardTotal",sb_s_no);
	}
	
	public List<SboardBean> sboardDetail(int sb_no){
		return (List<SboardBean>) getSqlMapClientTemplate().queryForList("SboardDetail",sb_no);
	}
	
	public void sboardInsert(SboardBean sb){
		getSqlMapClientTemplate().insert("sboardInset", sb);
	}
	
	public SboardBean UpdateForm(Integer sb_no){
		return (SboardBean) getSqlMapClientTemplate().queryForObject("updateForm", sb_no);
	}
	
	public void sboardUpdate(SboardBean sboard){
		getSqlMapClientTemplate().update("sboardUpdate", sboard);
	}
	
	public void sboardDelete(Integer sb_no){
		getSqlMapClientTemplate().delete("sboardDelete", sb_no);
	}
}
